package main

import (
	"fmt"
	"go.mongodb.org/mongo-driver/bson/primitive"
	"time"

	"traning/db_pool_application/repository"
)

func main()  {
	instance := repository.GetTaskRepositoryInstance()
	//docs, err := instance.QueryQuotation("datablock", "表格")
	ans := make([]interface{}, 0)
	a := time.Now()
	for i := 0 ; i < 1000; i++ {
		objId, _ := primitive.ObjectIDFromHex("5ec669c09d28f5e67be9b957")
		docs, err := instance.QueryById("datablock", objId)
		if err != nil {
			panic(err)
		}
		ans = append(ans, docs)
	}
	fmt.Println(time.Since(a))
	//fmt.Println(ans)
}